import http from "../tools/http"
import { RouteParamValue } from "vue-router"
import { UnwrapRef } from "vue"

//获取风险库列表
export function GetEmployeeList(params: { pageIndex: number; pageSize: number }) {
  return http.get("/Employee/GetEmployeeList", params)
}

//添加风险
export function AddEmployee(
  params: UnwrapRef<{
    gender: string
    birthDate: string
    photo: string
    hireDate: string
    emergencyContactPhone: string
    emergencyContactName: string
    phone: string
    name: string
    position: string
    department: string
    email: string
    workExperience: string
    remarks: string
  }>
) {
  return http.post("/Employee/AddEmployee", params)
}

//获取风险详情
export function GetEmployee(id: string | RouteParamValue[]) {
  return http.get("/Employee/GetEmployee", { id })
}

//删除
export function RemoveEmployee(id: string | RouteParamValue[]) {
  return http.delete("/Employee/DeleteEmployee", { id })
}
